package com.hjy.websocketservice;


public class WebSocketResponse<T> {

    private int code;

    private T data;

    public WebSocketResponse() {}

    public WebSocketResponse(int code, T data) {
        this.code = code;
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }


    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public static <T> WebSocketResponse result(int code, T data) {

        return new WebSocketResponse(code,code);

    }


}
